<?php
function smarty_function_request($params, &$smarty)
{
	$element=Vars::_(Core::LAST_REQUEST);
	if(isset($params['asArray'])){
	    $return=Request::getVar($params['name'],isset($element[$params['name']])?$element[$params['name']]:'');
	}else{
        $return=Request::getString($params['name'],isset($element[$params['name']])?$element[$params['name']]:'');
	}
    if(isset($params['assign'])){
	   $smarty->assign($params['assign'], $return);
	}else{
	    echo $return;
	}
} 

?>